import service from "@/utils/request";
const DEPT_BASE_URL = "/api/";
import {personalData,updPhoneModel} from './model'

class personalAPI{
//修改个人密码
  static changePassword(data: personalData) {
    return service<any, personalData>({
      url: `${DEPT_BASE_URL}PersonalSetting/UpdatePassWord`,
      method: "post",
      data:data
  })
  }
  //修改手机号
  static GetPhoneId(data: updPhoneModel) {
    return service<any, updPhoneModel>({
      url: `${DEPT_BASE_URL}PersonalSetting/UpdatePhone`,
      method: 'post',
      data
    })
  }
  //获取手机号
  static SendPhoneCode(phone:any) {
    return service<any>({
      url: `${DEPT_BASE_URL}User/CallPhone`,
      method: 'get',
      params: {
        personage_Phone:phone
      }
    })
  }
}
//导出类
export default personalAPI;
//显示个人信息
export const getPersonalMessage = (
UserId:number
) => {
  return service.get("/api/PersonalSetting/GetPersonalDetails", {
    params: {
      uid: UserId
    }
  });
}
